﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/SubMaster.Master" AutoEventWireup="true" CodeBehind="WebFormAddresses.aspx.cs" Inherits="CustomersSuppliersWebApplication.WebFormAddresses" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="RadTextBoxSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="RadComboBoxCountries">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridResults" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
    </telerik:RadAjaxManagerProxy>

    <telerik:RadDockZone ID="RadDockZoneMiddle" runat="server" SkinID="RadDockZoneContent" CssClass="MinimumPageHeight">
        <telerik:RadDock ID="RadDockSearch" runat="server" Title="بحث" AllowedZones="RadDockZoneMiddle" SkinID="RadDockSearch" CssClass="MarginTop">
            <contenttemplate>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelSearch" runat="server" Text="بحث عام"></asp:Label>
                    <telerik:RadTextBox ID="RadTextBoxSearch" runat="server" SkinID="RadTextBoxSearch" OnTextChanged="RadTextBoxSearch_TextChanged"></telerik:RadTextBox>
                </div>
                <div class="DivSearch FloatRight MarginTop">
                    <asp:Label ID="LabelCountries" runat="server" Text="الدولة"></asp:Label>
                    <telerik:RadComboBox ID="RadComboBoxCountries" runat="server" SkinID="RadComboBoxSearch" OnSelectedIndexChanged="RadComboBoxCountries_SelectedIndexChanged"></telerik:RadComboBox>
                </div>
                <div class="Clear"></div>
            </contenttemplate>
        </telerik:RadDock>

        <telerik:RadDock ID="RadDockResults" runat="server" Title="النتائج" AllowedZones="RadDockZoneMiddle" SkinID="RadDockResults" CssClass="MarginTop">
            <contenttemplate>
                <div class="MarginTop">
                    <telerik:RadGrid ID="RadGridResults" runat="server" SkinID="RadGridPrimary" CellSpacing="0" GridLines="None" AutoGenerateColumns="False" ShowGroupPanel="True"
                        OnNeedDataSource="RadGridResults_NeedDataSource" OnItemCommand="RadGridResults_ItemCommand" OnInsertCommand="RadGridResults_InsertCommand" OnItemCreated="RadGridResults_ItemCreated"
                        OnItemDataBound="RadGridResults_ItemDataBound" OnUpdateCommand="RadGridResults_UpdateCommand" OnDeleteCommand="RadGridResults_DeleteCommand">
                        <MasterTableView DataKeyNames="Address_ID" Name="Addresss">
                            <Columns>
                                <telerik:GridBoundColumn DataField="Address_RowNumber" DataType="System.Int32" UniqueName="Address_RowNumber" HeaderText="الرقم" Display="false" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_ID" DataType="System.Guid" UniqueName="Address_ID" HeaderText="الكود" Display="False" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_Code" DataType="System.String" UniqueName="Address_Code" HeaderText="كود المستخدم" Display="true" EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Country_NameAr" DataType="System.String" UniqueName="Country_NameAr" HeaderText="الدولة" Display="true" ReadOnly="true"  EditFormColumnIndex="1">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="Country_ID" HeaderText="الدولة" Display="false">
                                    <EditItemTemplate>
                                        <telerik:RadComboBox ID="RadComboBoxCountries" runat="server">
                                        </telerik:RadComboBox>
                                    </EditItemTemplate>
                                    <ItemTemplate></ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="State_NameAr" DataType="System.String" UniqueName="State_NameAr" HeaderText="المحافظة" Display="true"  EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="State_NameEn" DataType="System.String" UniqueName="State_NameEn" HeaderText="State" Display="false"  EditFormColumnIndex="1">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Town_NameAr" DataType="System.String" UniqueName="Town_NameAr" HeaderText="المدينة" Display="true"  EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Town_NameEn" DataType="System.String" UniqueName="Town_NameEn" HeaderText="Town" Display="false"  EditFormColumnIndex="1">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_NameAr" DataType="System.String" UniqueName="Address_NameAr" HeaderText="العنوان" Display="true"  EditFormColumnIndex="0">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_NameEn" DataType="System.String" UniqueName="Address_NameEn" HeaderText="Address" Display="false" EditFormColumnIndex="1">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Postal_Code" DataType="System.String" UniqueName="Postal_Code" HeaderText="الرقم البريدى" Display="true"  EditFormColumnIndex="1">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_Notes" UniqueName="Address_Notes" HeaderText="ملاحظات">
                                </telerik:GridBoundColumn>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn" CancelText="الغاء" UpdateText="حفظ" EditText="تحرير">
                                </telerik:GridEditCommandColumn>
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="40px" ConfirmDialogType="RadWindow" ConfirmText="هل انت متاكد من عملية الحذف ؟" ConfirmTitle="حذف" Text="حذف" UniqueName="DeleteColumn">
                                </telerik:GridButtonColumn>
                                <telerik:GridRowIndicatorColumn Resizable="True" Visible="true">
                                </telerik:GridRowIndicatorColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </div>
            </contenttemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>
</asp:Content>
